package com.huawei.gamebox.service.welfare.gift.card;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.gamebox.service.common.cardkit.card.BaseGsCard;
import com.huawei.gamebox.service.welfare.gift.bean.CombineGiftListCardBean;
import com.huawei.gamebox.service.welfare.gift.bean.HorizonScrollGiftListBean;
import o.cgz;
import o.chy;
import o.exp.d;

public class CombineGiftListCard extends BaseGiftCard {
    private ImageView ˊ;
    private TextView ˋ;
    private chy ˏ;

    public /* synthetic */ cgz ˏ(View view) {
        return ˎ(view);
    }

    public CombineGiftListCard(Context context) {
        super(context);
    }

    public BaseGsCard ˎ(View view) {
        ˋ((TextView) view.findViewById(d.ᶥ));
        ˋ((ImageView) view.findViewById(d.ㆍ));
        ʽ(view);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        if (cardBean != null) {
            int size;
            super.ˏ(cardBean);
            CombineGiftListCardBean combineGiftListCardBean = (CombineGiftListCardBean) cardBean;
            if (combineGiftListCardBean.ˊ() != null) {
                size = combineGiftListCardBean.ˊ().size();
            } else {
                size = 0;
            }
            int ˋ = ˋ();
            for (int i = 0; i < ˋ; i++) {
                BaseGsCard ˊ = ˊ(i);
                if (ˊ != null && (ˊ instanceof HorizonScrollGiftListCard)) {
                    HorizonScrollGiftListCard horizonScrollGiftListCard = (HorizonScrollGiftListCard) ˊ;
                    if (i >= size) {
                        horizonScrollGiftListCard.ˉ().setVisibility(8);
                    } else {
                        horizonScrollGiftListCard.ˉ().setVisibility(0);
                        CardBean cardBean2 = (HorizonScrollGiftListBean) combineGiftListCardBean.ˊ().get(i);
                        cardBean2.ˋˋ(combineGiftListCardBean.ॱˉ());
                        horizonScrollGiftListCard.ˏ(cardBean2);
                    }
                }
            }
        }
    }

    public TextView ˊ() {
        return this.ˋ;
    }

    private void ˋ(TextView textView) {
        this.ˋ = textView;
    }

    public ImageView ʻ() {
        return this.ˊ;
    }

    private void ˋ(ImageView imageView) {
        this.ˊ = imageView;
    }

    public void ˎ(chy o_chy) {
        this.ˏ = o_chy;
    }
}
